Socket
Socket
Sign inDemoInstall

dev-null

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dev-null

/dev/null for node streams


Version published
Weekly downloads
329K
increased by5.38%
Maintainers
1
Weekly downloads
 
Created

What is dev-null?

The 'dev-null' npm package provides a writable stream that acts as a black hole, discarding all data written to it. This can be useful for testing, benchmarking, or simply ignoring output that is not needed.

What are dev-null's main functionalities?

Writable Stream

Creates a writable stream that discards all data written to it. This is useful for scenarios where you need to provide a writable stream but do not care about the data being written.

const devnull = require('dev-null');
const stream = devnull();

stream.write('This data will be discarded');
stream.end();

Piping Data

Demonstrates how to pipe data from a readable stream to the dev-null writable stream, effectively discarding the data read from the input file.

const devnull = require('dev-null');
const fs = require('fs');

const readStream = fs.createReadStream('input.txt');
const writeStream = devnull();

readStream.pipe(writeStream);

Other packages similar to dev-null

Keywords

FAQs

Package last updated on 10 Sep 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc